
namespace CSharpPro._0922;

public class Travel
{
    public int season;
    public string plan;
    public int price = 8800;

    public Travel(int season, string plan)
    {
        this.season = season;
        this.plan = plan;
    }

    public int ShowPrice()
    {
        if (this.season >= 5 && this.season <= 10)
        {
            if (this.plan == "航班")
            {
                return (int)(price * 0.9);
            }
            else if (this.plan == "动车")
            {
                return (int)(price * 0.75);
            }
        }
        else if ((this.season < 5 && this.season > 10))
        {
            if (this.plan == "航班")
            {
                return (int)(price * 0.6);
            }
            else if (this.plan == "动车")
            {
                return (int)(price * 0.3);
            }
        }
        return 0;
    }
}
